package com.ykj.controller;


import com.ykj.dto.Result;
import com.ykj.entity.Area;
import com.ykj.service.AreaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Y2014188432
 * @since 2022-05-03
 */
@RestController
@RequestMapping("/area")
public class AreaController {

    @Resource
    private AreaService areaService;

    @GetMapping("/test")
    public Result test(){
        System.out.println("area test");
        Area areaServiceById = areaService.getById(1);
        return Result.ok(areaServiceById);
    }
}

